package cn.edu.zxj.productapi.api;

import cn.edu.zxj.productapi.model.ProductInfo;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * Created with IntelliJ IDEA.
 * Description：
 *
 * @author: zxj
 * @date: 2024-10-01
 * @time: 12:30:33
 */
public interface ProductInterface {
    @RequestMapping("/{productId}")
    ProductInfo getProductInfo(@PathVariable("productId") Long productId);

    @RequestMapping("/p1")
    String getProductInfoByFeign(@RequestParam("id") Integer id);

    @RequestMapping("/p2")
    public String getProductInfoByFeign(@RequestParam("id") Integer id, @RequestParam("name") String name);

    @RequestMapping("/p4")
    public String p3(@SpringQueryMap ProductInfo productInfo);

    @RequestMapping("/p5")
    public String p4(@RequestBody ProductInfo productInfo);
}
